<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>发送POST请求</title>
<link href="../../../theme/style.css" rel="stylesheet" type="text/css" />
<script src="../../../theme/jquery.js" type="text/javascript"></script>
<script src="../../../theme/wscui.js" type="text/javascript"></script>
<script src="../../../theme/style.js" type="text/javascript"></script>
</head>
<body>
<div catalog-feed class="grammar">
	<h1>post</h1>
	<label class="format">
		<span class="t">string</span> <span class="f">post</span>(
			<span class="t">string</span> <span class="v">$param</span> [, 
				<span class="t">boolean</span> <span class="v">$return</span>
			])
	</label>
	<div class="intro">
		以POST方式, 请求指定URL；
	</div>
	<div class="return">
		<div class="how">
			<span class="c">// 返回请求结果</span><br />
			<span class="c">// 如果状态码不在配置CURL_CODE_SUCCESS数组中时, 将返回服务器错误</span><br />
			<span class="t">return</span> 
			<span class="f">M</span> (<span class="s">curl</span>) -> 
			<span class="f">post</span> (<span class="s">http://www.example.com</span>, <span class="t">true</span>);
		</div>
	</div>
	<div class="param">
		<h3>$param</h3>
		<ul>
			<li>
				<span show>string</span>
				<label>待请求URL地址</label>
				<div hide class="how">
					<span class="f">M</span>(<span class="s">curl</span>) -> <span class="f">post</span>(<span class="s">http://www.example.com</span>);
				</div>
			</li>
		</ul>
		<h3>$return</h3>
		<ul>
			<li>
				<span show>boolean</span>
				<label>结果是否以文件流返回</label>
				<div hide class="how">
					<span class="f">M</span>(<span class="s">curl</span>) -> <span class="f">post</span>(<span class="s">http://www.example.com</span>); <span class="c">// 输出内容并退出</span><br />
					<span class="v">$html</span> = <span class="f">M</span>(<span class="s">curl</span>) -> <span class="f">post</span>(<span class="s">http://www.example.com</span>, <span class="t">true</span>); <span class="c">// 以文本流返回</span>
				</div>
			</li>
		</ul>
	</div>
</div>
</body>
</html>